<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // isNaN()  传入一个参数 判断是否是非数字  非数字=> true 数字返回=>false

    // 如果传入number类型  => 直接判断
    // console.log(isNaN(NaN));
    // console.log(isNaN(0));
    // console.log(isNaN(Infinity));

    // 如果传入非number类型 => 先隐式转化为number类型 再判断
    console.log(isNaN("10"));  // "10" => 10 => false
    console.log(isNaN(true));  // true => 1 => false
    console.log(isNaN(null));  // null => 0 => false

    console.log(isNaN("10a"));  // "10a" => NaN => true
    console.log(isNaN(undefined));  // undefined => NaN => true



</script>

</html>